package Entidades;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name="Mesa")
public class Mesa implements Serializable {
	private static final long serialVersionUID=1L;
	
	@Id @GeneratedValue(strategy=GenerationType.AUTO)
	@Column(nullable=false, name="idMesa")
	private int idMesa;
	
	@Column(nullable=false, name="nroMesa")
	private int nroMesa;
	
	@Column(nullable=true, length=50, name="descripcion")
	private String descripcion;
	
	@OneToOne(fetch=FetchType.LAZY)
	@JoinColumn(nullable=false, name="idSector")
	private Sector sector;
	
}
